import request from "@/utils/request";

const buildingApi = {
    /**
     * 根据主键修改业主信息函数
     */
    async updateBuildingById(building: any) {
        let res = await request.put(`/building/updateBuildingById`, building)
        return res.data;
    },

    async selectAll(buildingForm: any) {
        let res = await request.get(`/building/findAll`,{params:buildingForm});
        return res;
    },
    async addBuilding(building: any) {
        let res = await request.post(`/building/addBuilding`,building);
        return res.data;
    },
    async delById(id: any) {
        let res = await request.delete(`/building/removeById/${id}`);
        return res.data;
    },
    async batchedDeleByIds(ids: String) {
        let res = await request.delete(`/building/removeByIds/${ids}`)
        return res.data;
    }
    
}
export default buildingApi;